<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">
<!--! This loads in an iframe. -->
<head>
  <meta content="text/html; charset=UTF-8" http-equiv="content-type" />
  <style type="text/css">
    @import "/wp/webpyte.css";
    body {background-color:#ffe; padding:10px;}
  </style>
  <title py:if="defined('pagetitle')" py:content="pagetitle" />
</head>
<body>
<xi:include href="webpyte_includes.html" />
<div>
<div py:if="has_flash()" class="Status Pad" py:content="flash()"></div>
<tableform id='ImageManUpload' action='${action}'>
  <label for='upload'>Upload:</label>
  ${ f.File(id="upload", onchange="q('name').value=makeNiceFileName(this.value, 20,'.');q('size_limit').select();", size=30) }
  <table>
    ${f.Text(id='url', label='or URL', size=35)}
    ${f.Text(id="size_limit", label="Size limit", size=11, help='(width x height)', value=size_limit, title='maximum size in pixels')}
    ${f.Text(id='name', label='File name', size=20, help='(no spaces)')}
  </table>
  <p style='text-align:center;'>
    ${f.Submit(id="btnUpload", value="Upload", action=action, title='Save image on server')}
  </p>
  ${f.scripts()}
</tableform>
</div>
<script py:if="uploaded">
  n = window.parent.notifyUpload
  if (typeof(n) == 'undefined')
    alert('Erro: notifyUpload() não encontrada!');
  else n("${uploaded}");
</script>
</body>
</html>
